package io.gitee.zhangbinhub.admin.route.po

import io.swagger.v3.oas.annotations.media.Schema
import jakarta.validation.constraints.NotBlank

/**
 * @author zhang by 17/03/2019
 * @since JDK 11
 */
@Schema(description = "网关路由配置参数")
data class RoutePo(
    @Schema(description = "ID")
    var id: String? = null,

    @Schema(description = "路由ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @get:NotBlank(message = "路由ID不能为空")
    var routeId: String? = null,

    @Schema(description = "路由URI", requiredMode = Schema.RequiredMode.REQUIRED)
    @get:NotBlank(message = "路由URI不能为空")
    var uri: String? = null,

    @Schema(description = "路由断言", requiredMode = Schema.RequiredMode.REQUIRED)
    @get:NotBlank(message = "路由断言不能为空")
    var predicates: String? = null,

    @Schema(description = "路由过滤器")
    var filters: String? = null,

    @Schema(description = "元数据")
    var metadata: String? = null,

    @Schema(description = "路由序号")
    var orderNum: Int = 0,

    @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED)
    var enabled: Boolean? = null,

    @Schema(description = "备注")
    var remarks: String? = null
)
